import request from '@/request'

export function selectCategory(formdata) {
    return request({
      url: '/category/select',
      method: 'post',
      data: formdata
    })
  }

  export function addCategory(formdata) {
    return request({
      url: '/category/insert',
      method: 'post',
      data: formdata
    })
  }

  export function updateCategory(formdata) {
    return request({
      url: '/category/update',
      method: 'post',
      data: formdata
    })
  }

  export function deleteCategory(id) {
    return request({
      url: `/category/delete/${id}`,
      method: 'post',
    })
  }